package com.siemens.industrial.model.admin;

import org.springframework.jdbc.core.RowMapper;

/**
 * Created by qupen on 2016/9/18.
 */
public class SystemConfig {

    public static final String Mail_CONFIG_KEY = "mail_config_key";//邮件配置
    public static final String Mail_IPADDRESS_KEY = "ip_address_key";//服务器/ip地址
    public static final String Mail_USERNAME_KEY = "username_key";//用户名
    public static final String Mail_PASSWORD_KEY = "password_key";//密码
    public static final String Mail_MAILADDRESS_KEY = "mailAddress_key";//邮件地址
    public static final String Mail_MAILTYPE_KEY = "mailType_key";//邮件类型
    public static final String Mail_PORT_KEY = "port_key";//端口

    public static final String LOGS_CONFIG_KEY = "logs_config_key";
    public static final String LOG_USER_LOGIN_KEY = "loginLog";
    public static final String LOG_USER_OPERATE_KEY = "adminLog";
    public static final String LOG_TENANT_OPERATE_KEY = "tenantLog";
    public static final String LOG_DATABASE_BACKUP_KEY = "dbLog";

    public static final String DBBACKUP_KEY = "DBBackup";

    private String systemKey;
    private String systemName;
    private String systemValue;

    private static final RowMapper<SystemConfig> rowMapper = (resultSet, i) -> {
        SystemConfig systemConfig = new SystemConfig();
        systemConfig.setSystemKey(resultSet.getString("system_key"));
        systemConfig.setSystemName(resultSet.getString("system_name"));
        systemConfig.setSystemValue(resultSet.getString("system_value"));
        return systemConfig;
    };

    public static RowMapper<SystemConfig> getRowMapper() {
        return rowMapper;
    }

    public String getSystemKey() {
        return systemKey;
    }

    public void setSystemKey(String systemKey) {
        this.systemKey = systemKey;
    }

    public String getSystemName() {
        return systemName;
    }

    public void setSystemName(String systemName) {
        this.systemName = systemName;
    }

    public String getSystemValue() {
        return systemValue;
    }

    public void setSystemValue(String systemValue) {
        this.systemValue = systemValue;
    }
}
